{extend name="common/pop" /}
{block name="content"}

<div class="layui-form" style="margin-top:15px;width:90%;">
    {php} echo $html;{/php}
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter='create'>立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script>
    layui.use(['layer','jquery','form'],function () {
        var form = layui.form,
            layer = layui.layer,
            $ = layui.jquery;

        form.render();


        form.on('submit(create)',function(data){
            $.post('{:url("config",["flag"=>input("get.flag")])}',data.field,function(r){
                if(r.code == 1){
                    layer.msg(r.msg);
                    close(1500,true);
                }else{
                    layer.msg(r.msg);
                }
            },'json')
        });
    })
</script>
{/block}

